import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Jiang Jinxi
 * Date: 2024-03-02
 * Time: 19:31
 */
public class Test {
    public static void main(String[] args) {
        System.out.print("Enter a number between 0 and 1000: ");
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        int a = num % 10;
        num /= 10;
        int b = num % 10;
        num /= 10;
        int c = num % 10;
        System.out.println("The sum of the digits is " + (a + b + c));
    }
}
